package com.eternal.base.data.source;

import androidx.paging.DataSource;

import com.eternal.base.concat.*;
import com.eternal.base.database.entity.History;

import io.reactivex.Flowable;

/**
 * Created by Administrator
 * On 2020/4/24
 * Description:
 *
 * @author Administrator
 */
public interface IHistorySource {

    /**
     * @param mac
     */
    DataSource.Factory<Integer, TmpHum> getHistory(String mac);

    /**
     * @param mac
     * @param times
     * @param start
     * @param end
     */
    DataSource.Factory<Integer, TmpHum> getHistoryMin(String mac, java.util.List<String> times, long start, long end);

    /**
     * @param mac
     * @param times
     * @param min
     * @param start
     * @param end
     */
    DataSource.Factory<Integer, TmpHum> getHistoryHour(String mac, java.util.List<String> times, String min, long start, long end);

    /**
     * @param mac
     * @param start
     * @param end
     */
    DataSource.Factory<Integer, TmpHum> getHistory(String mac, long start, long end);

    /**
     * @param history
     */
    void add(History history);

    /**
     * @param mac
     */
    long getTime(String mac);

    /**
     * @param mac
     */
    long getFirstTime(String mac);

    Flowable<DeviceInfo> getInfo(String mac);

    boolean isDegree(String mac);
}